package com.csnf.service;

import com.csnf.dao.UserDao;
import com.csnf.entity.User;

import java.sql.SQLException;
import java.util.List;

public class UserService {
    UserDao userDao = new UserDao();
    public List<User> getAll() throws Exception {
        return userDao.getAll();
    }

    public List<User> getUserByNickName(String nickName) throws Exception {
        return userDao.getUserByNickName(nickName);
    }

    public User getUserById(Integer user_id) throws Exception {
        return userDao.getUserById(user_id);
    }

    public Boolean updateUser(User user) throws Exception {
        return userDao.updateUser(user);
    }

}
